// pages/start/start.js

const app = getApp()

Page({

    /**
     * 页面的初始数据
     */
    data: {
        cut2:1,
        cut1:0,
        cut3:5,
        cut4:7,

        num1:0,
        num2:0,
        num3:0,
        num4:0,
        a1:"",
        animateStyle1:"",
        animateStyle2:"",
        animateStyle3:"",
        animateStyle4:"",
      },


    /* 跳转菜单 */
    gotomenu(){
        wx.navigateTo({
          url: '/pages/index/index'
        })
    },

    /*特效按钮点击事件 */

    
    onTapButton:function(){
        console.info(this.data.cut);
        console.info(this.data.cut%2);
        /* 揣手手 */
        if(this.data.cut2%2){
            this.setData({num2:1,animateStyle2:'',cut2:this.data.cut2+1},);
            this.setData({a1:'animate__animated',animateStyle2:'animate__lightSpeedInRight'});
        }else{
            this.setData({animateStyle2:'',cut2:this.data.cut2+1});
            this.setData({a1:'animate__animated',animateStyle2:'animate__zoomOut'});
        }
        /* 飞来飞去 */
        if(this.data.cut1%3===0){
            this.setData({num1:1,animateStyle1:'',cut1:this.data.cut1+1},);
            this.setData({a1:'animate__animated',animateStyle1:'animate__bounce'});
        }else{
            this.setData({animateStyle1:'',cut1:this.data.cut1+1});
            this.setData({a1:'animate__animated',animateStyle1:'animate__backOutLeft'});
        }


        
        /* 自闭泥 */
        if(this.data.cut3%5===0){
            this.setData({num3:1,animateStyle3:'',cut3:this.data.cut3+1},);
            this.setData({a1:'animate__animated',animateStyle3:'animate__rubberBand'});
        }else{
            this.setData({animateStyle3:'',cut3:this.data.cut3+1});
            this.setData({a1:'animate__animated',animateStyle3:'animate__fadeOut'});
        }
        /* 抱鱼鱼 */
        if(this.data.cut4%7===0){
            this.setData({num4:1,animateStyle4:'',cut4:this.data.cut4+1},);
            this.setData({a1:'animate__animated',animateStyle4:'animate__flip'});
        }else{
            this.setData({animateStyle4:'',cut4:this.data.cut4+1});
            this.setData({a1:'animate__animated',animateStyle4:'animate__bounceOutDown'});
        }
        
    }


})